// import { Loading } from "element-ui";

export let ObjectUtils = new class {
	isEmpty(val) {
		if (Object.prototype.toString.call(val) === "[object String]") {
			return !val.trim().length > 0
		} else if (Object.prototype.toString.call(val) === "[object Array]") {
			return !val.length > 0
		} else if (Object.prototype.toString.call(val) === "[object Object]") {
			return !Object.keys(val).length > 0
		} else {
			return false;
		}
	}
}

export let localLoadingOptions = {
	text: "加载中",
	spinner: "el-icon-loading"
}

// console.log(Object.prototype.toString.call(undefined))
// console.log(Object.prototype.toString.call([]))
// console.log(Object.prototype.toString.call({}))
// console.log(Object.prototype.toString.call(""))
// console.log(Object.prototype.toString.call(null))
